﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Fraktalysator.Forms
{
	class ToolForm : ArgusLib.Controls.BaseForm
	{
		bool isTerminating = false;

		protected override void OnFormClosing(System.Windows.Forms.FormClosingEventArgs e)
		{
			if (e.CloseReason == CloseReason.UserClosing)
			{
				if (this.isTerminating == false)
				{
					e.Cancel = true;
					this.Visible = false;
				}
			}
			base.OnFormClosing(e);
		}

		public void Terminate()
		{
			this.isTerminating = true;
			this.Close();
		}
	}
}
